/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dominio.atendente.jogo;

import java.io.Serializable;
import java.util.Calendar;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author devair
 */
@Entity
@Table(name = "partidaJogo")
@SequenceGenerator(name = "partidajogoseq", initialValue = 1, allocationSize = 1)

public class PartidaJogo implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "partidajogoseq")
    private Long id;

    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Calendar dataHorario;

    @OneToMany(cascade = CascadeType.PERSIST)
    private List<CadeiraJogo> cadeiras;

    private String local;
    private String timeAdversario;

    /**
     * @return the data
     */
    public Calendar getData() {
        return dataHorario;
    }

    /**
     * @param data the data to set
     */
    public void setData(Calendar data) {
        this.dataHorario = data;
    }

    /**
     * @return the local
     */
    public String getLocal() {
        return local;
    }

    /**
     * @param local the local to set
     */
    public void setLocal(String local) {
        this.local = local;
    }

    /**
     * @return the timeAdversario
     */
    public String getTimeAdversario() {
        return timeAdversario;
    }

    /**
     * @param timeAdversario the timeAdversario to set
     */
    public void setTimeAdversario(String timeAdversario) {
        this.timeAdversario = timeAdversario;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<CadeiraJogo> getCadeiras() {
        return cadeiras;
    }

    public void setCadeiras(List<CadeiraJogo> cadeiras) {
        this.cadeiras = cadeiras;
    }

    public Calendar getDataHorario() {
        return dataHorario;
    }

    public void setDataHorario(Calendar dataHorario) {
        this.dataHorario = dataHorario;
    }

}
